Option Explicit On 
Option Strict On

Imports System
Imports System.Collections
Imports System.Collections.Specialized

Public Class AttribClass
    Private sLabel As String = ""
    Private sDef As String = ""
    Private sDefSource As String = ""
    Private sDates As New StringCollection 'contains beginning and, possibly, ending dates separated by delimiter
    Private dValueAcc As Decimal = 0
    Private sValueAccExplain As String = ""
    Private sMeasFreq As String = ""
    Private cDomainValue As New Collection 'contains integers linking to primary collection of domain values

    'For sDomainValueType:
    'Type = enum means Enumerated Domain, capability provided by AttribDomain_Enum class
    'Type = range means Range Domain, capability provided by AttribDomain_Range class
    'Type = codeset means Codeset Domain, capability provided by a delimited string
    'Type = unrep means Unrepresentable Domain, capability provided by a string

    Public Sub New()
        MyBase.new()
    End Sub
    Public Sub Clear()
        sLabel = ""
        sDef = ""
        sDefSource = ""
        sDates.Clear()
        dValueAcc = 0
        sValueAccExplain = ""
        sMeasFreq = ""
        cDomainValue.Clear()
    End Sub
    Public Function Duplicate() As AttribClass
        Dim newAttrib As AttribClass = New AttribClass()
        newAttrib.Label = sLabel
        newAttrib.Definition = sDef
        newAttrib.DefSource = sDefSource
        newAttrib.ValueDates = sDates
        newAttrib.Accuracy = dValueAcc
        newAttrib.AccExplain = sValueAccExplain
        newAttrib.MeasureFreq = sMeasFreq
        Return newAttrib
    End Function
    Public Property Label() As String
        Get
            Label = sLabel
        End Get
        Set(ByVal Value As String)
            sLabel = Value
        End Set
    End Property

    Public Property Definition() As String
        Get
            Definition = sDef
        End Get
        Set(ByVal Value As String)
            sDef = Value
        End Set
    End Property

    Public Property DefSource() As String
        Get
            DefSource = sDefSource
        End Get
        Set(ByVal Value As String)
            sDefSource = Value
        End Set
    End Property

    Public Property ValueDates() As StringCollection
        Get
            ValueDates = sDates
        End Get
        Set(ByVal Value As StringCollection)
            sDates = Value
        End Set
    End Property

    Public Property Accuracy() As Decimal
        Get
            Accuracy = dValueAcc
        End Get
        Set(ByVal Value As Decimal)
            dValueAcc = Value
        End Set
    End Property

    Public Property AccExplain() As String
        Get
            AccExplain = sValueAccExplain
        End Get
        Set(ByVal Value As String)
            sValueAccExplain = Value
        End Set
    End Property

    Public Property MeasureFreq() As String
        Get
            MeasureFreq = sMeasFreq
        End Get
        Set(ByVal Value As String)
            sMeasFreq = Value
        End Set
    End Property

    Public Property DomainValues() As Collection
        Get
            DomainValues = cDomainValue
        End Get
        Set(ByVal Value As Collection)
            cDomainValue = Value
        End Set
    End Property

End Class
